@mixin hot-child {
  display: inline-block;
  width: 25rpx;
  height: 25rpx;
  border-radius: 50%;
  vertical-align: bottom;
  margin-right: 15rpx;
  margin-bottom: 4rpx;
  font-size: 18rpx;
  text-align: center;
}
// 搜索
.search {
  width: 100%;
  height: 100vh;
  background-color: #f7f7f7;
  // 搜索框
  .saerch-bar {
    display: flex;
    align-items: center;
    padding: 0 30rpx;
    height: 80rpx;
    background-color: #fff;
    .search-box {
      flex: 1;
      display: flex;
      align-items: center;
      padding: 5rpx 10rpx;
      margin-right: 20rpx;
      color: #808080;
      font-size: 26rpx;
      border-radius: 30rpx;
      background-color: #f0f0f0;
      .iconfont {
        margin-right: 15rpx;
      }
      input {
        flex: 1;
      }
    }
    .icon-chacha {
      position: absolute;
      right: 130rpx;
      font-size: 20rpx;
      color: #fff;
      padding: 5rpx;
      border-radius: 50%;
      z-index: 2;
      background-color: #cecece;
    }
    .search-btn {
      color: #636363;
      font-size: 28rpx;
    }
  }
  // 热门搜索及最近搜索
  .search-provide {
    padding: 40rpx;
    // 热门搜索
    .hot-search {
      font-size: 26rpx;
      .title {
        margin-bottom: 25rpx;
        color: #858585;
      }
      .hot-items {
        display: flex;
        flex-wrap: wrap;
        margin-left: 35rpx;
        .hot-item {
          width: 50%;
          color: #121212;
          font-size: 24rpx;
          margin-bottom: 25rpx;
          &:nth-child(1)::before {
            @include hot-child;
            content: '1';
            color: #fff;
            background-color: #e14f2f;
          }
          &:nth-child(2)::before {
            @include hot-child;
            content: '2';
            color: #fff;
            background-color: #fd7c16;
          }
          &:nth-child(3)::before {
            @include hot-child;
            content: '3';
            color: #fff;
            background-color: #f9be01;
          }
          &:nth-child(4)::before {
            @include hot-child;
            content: '4';
            color: #fff;
            background-color: #d7d7d7;
          }
        }
      }
    }
    // 最近搜索
    .recently-search {
      font-size: 26rpx;
      margin-top: 40rpx;
      .title {
        display: flex;
        align-items: center;
        justify-content: space-between;
        color: #858585;
      }
      .recently-items {
        display: flex;
        flex-wrap: wrap;
        margin-top: 20rpx;
        font-size: 24rpx;
        .recently-item {
          padding: 6rpx 18rpx;
          background-color: #f0f0f0;
          margin-right: 40rpx;
          margin-bottom: 30rpx;
          border-radius: 20rpx;
          color: #424242;
        }
      }
    }
  }
  // 搜索建议
  .search-commend {
    
    // 每一条搜索建议
    .commend-item {
      display: flex;
      justify-content: space-between;
      padding: 30rpx;
      font-size: 28rpx;
      border-bottom: 1px solid #eee;
      background-color: #fbf7f4;
      .commend-left {
        .iconfont {
          margin-right: 15rpx;
          color: #d0ccc9;
          font-size: 28rpx;
        }
      }
      .commend-right {
        color: #d0ccc9;
        font-size: 28rpx;
      }
    }
  }
  // 搜索结果
  .serach-result {
    height: 100%;
    padding: 40rpx;
    background-color: #fff;
    // 每一项搜索结果
    .result-item {
      display: flex;
      font-size: 28rpx;
      margin-bottom: 30rpx;
      &:last-child {
        padding-bottom: 40rpx;
      }
      .item-cover {
        width: 160rpx;
        height: 220rpx;
        margin-right: 30rpx;
        box-shadow: 0px 1px 4px 1px rgba($color: #000000, $alpha: 0.2);
        image {
          width: 100%;
          height: 100%;
        }
      }
      .item-message {
        display: flex;
        flex-direction: column;
        justify-content: space-between;
        width: 70%;
        // background-color: pink;
        // 书籍标题及作者
        .item-top {
          .author {
            margin-top: 10rpx;
            font-size: 24rpx;
            color: #b2b2b4;
          }
        }
        // 简介
        .item-info {
            font-size: 24rpx;
            color: #6b6b6b;
        }
      }
    }
  }
}